package org.jaaksi.demo.ptr.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import org.jaaksi.demo.ptr.R;
import org.jaaksi.demo.ptr.ui.test.rxjava.TestRxJavaActivity;

public class MainActivity extends FragmentActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	public void go(View view) {
		Intent intent = new Intent();
		Class cls = null;
		switch (view.getId()) {
			case R.id.btn_tet:
				cls = TestActivity.class;
				break;
			case R.id.btn_pull_normal:
				cls = PtrNormalActivity.class;
				break;
			case R.id.btn_customer_header:
				cls = CustomHeaderActivity.class;
				break;
			case R.id.btn_taobao_header:
				cls = TaoBaoHeaderActivity.class;
				break;
			case R.id.btn_end_auto_load:
				cls = AutoLoadMoreActivity.class;
				break;
			case R.id.btn_end:
				cls = ClickLoadMoreActivity.class;
				break;
			case R.id.btn_okhttpfinal:
				cls = OkHttpFinalActivity.class;
				break;
			case R.id.btn_list:
				cls = MyListActivity.class;
				break;
			case R.id.btn_loadmore:
				cls = LoadMoreActivity.class;
				break;
			case R.id.btn_material:
				cls = MaterialActivity.class;
				break;
			case R.id.btn_rxjava:
				cls = TestRxJavaActivity.class;
				break;
		}
		if (cls != null) {
			intent.setClass(this, cls);
			startActivity(intent);
		}
	}
}
